package com.service1.db.mybatis_plus.db1.mapper

import com.baomidou.mybatisplus.core.conditions.Wrapper
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import com.baomidou.mybatisplus.core.metadata.IPage
import com.baomidou.mybatisplus.core.toolkit.Constants
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
import com.base.model.service1.db.Model_Service1_MyBatisPlusDB
import org.apache.ibatis.annotations.Mapper
import org.apache.ibatis.annotations.Param
import org.apache.ibatis.annotations.Select
import org.springframework.stereotype.Repository

@Mapper
@Repository
interface MybatisPlusDB1Mapper : BaseMapper<Model_Service1_MyBatisPlusDB> {
    @Select(
        """
        select
        t_id id
        from t_test t
        ${'$'}{ew.customSqlSegment}
    """
    )
    fun selectSQL(@Param(Constants.WRAPPER) wrapper: Wrapper<Model_Service1_MyBatisPlusDB>): List<Model_Service1_MyBatisPlusDB>

    @Select(
        """
        select
        t_id id
        from t_test t
        ${'$'}{ew.customSqlSegment}
    """
    )
    fun selectSQLPage(page: Page<Model_Service1_MyBatisPlusDB>, @Param(Constants.WRAPPER) wrapper: Wrapper<Model_Service1_MyBatisPlusDB>): IPage<Model_Service1_MyBatisPlusDB>
}
